import os
import shutil

location_root = "D:/data/compKeyData/data/outcome/"

listFile = os.listdir(location_root)
print(listFile)
for file in listFile:
    if not ('.txt' in file or '.log' in file):
        listDir = os.listdir(location_root + file)
        for dir in listDir:
            if os.path.isdir(location_root + file + '/' +dir):
                # shutil.rmtree(path)
                shutil.rmtree(location_root + file + '/' +dir)
            else:
                os.remove(location_root + file + '/' +dir)
